<? function hexLighter($hex,$factor = 30) 
    { 
    $new_hex = ''; 
     
    $base['R'] = hexdec($hex{0}.$hex{1}); 
    $base['G'] = hexdec($hex{2}.$hex{3}); 
    $base['B'] = hexdec($hex{4}.$hex{5}); 
     
    foreach ($base as $k => $v) 
        { 
        $amount = 255 - $v; 
        $amount = $amount / 100; 
        $amount = round($amount * $factor); 
        $new_decimal = $v + $amount; 
     
        $new_hex_component = dechex($new_decimal); 
        if(strlen($new_hex_component) < 2) 
            { $new_hex_component = "0".$new_hex_component; } 
        $new_hex .= $new_hex_component; 
        } 
         
    return $new_hex;     
    }  ?>

/***************************************\

			General Structure
				
\***************************************/

#header, #middle, #footer { width: 100%; }
#header-block, #middle-block, #footer-block {
	width: 880px;
	padding-left: 20px;
	padding-right: 20px;
	margin: auto auto;
}
#header { display: block; }
#header-block {
	height: 160px;
	overflow: hidden;
}
#middle {
	padding-top:20px;
	padding-bottom:20px;
}
#middle-block { overflow: hidden; }
#menu {
	float: left;
	width: 160px;
	padding-right: 20px;
}
#content {
	float: left;
	width: 700px;
}


/***************************************\

				Header
				
\***************************************/

#header 			{ background: #<?=$centre['backgroundColour']?>; }
/*#header:hover 		{ background: #3F68BB; }*/
#header 			{ font-weight: 700; text-decoration: none; color: #FFF; }
#header-block 		{
	background-image: url('/img/header/header.png');
	background-position: 20px 0px;
	background-repeat: no-repeat;
}
#header-title 		{ position:relative; top:57px; font-size:40px; }
#header-subtitle 	{ position:relative; top:83px; font-size:20px; }
#header {
	transition: background .1s;
	-moz-transition: background .1s; /* Firefox 4 */
	-webkit-transition: background .1s; /* Safari and Chrome */
	-o-transition: background .1s; /* Opera */
}


/***************************************\

				Middle
				
\***************************************/

#middle 		{ background: #FFF; }


/***************************************\

				Menu

\***************************************/

#menu ul { margin: 0px 0px 40px 0px; }
#menu li {
	margin-left:30px;
	list-style:none;
	height: 60px;
	position:relative;
	top: -5px;
}

#menu a {
	font-size:20px;
	color: inherit;
	text-decoration:none;
}
#menu a:hover			{ color: #<?=hexLighter($centre['backgroundColour'],30)?>; }
#menu a.selected,
#menu a.selected:hover 	{ color: #<?=$centre['backgroundColour']?>; }
#menu a.selected,
#menu a.selected:hover 	{ font-weight:700; }

#menu a {
	transition: 		color .1s;
	-moz-transition: 	color .1s; /* Firefox 4 */
	-webkit-transition: color .1s; /* Safari and Chrome */
	-o-transition: 		color .1s; /* Opera */
}

#menu div.icon {
	position:relative;
	top:20px;
	left:-30px;
	display: block;
}

#menu a div.icon {
	transition: 		background-color .1s;
	-moz-transition: 	background-color .1s; /* Firefox 4 */
	-webkit-transition: background-color .1s; /* Safari and Chrome */
	-o-transition: 		background-color .1s; /* Opera */
}

#menu div.icon 							{ background-color: #333333; }
#menu a:hover div.icon					{ background-color: #<?=hexLighter($centre['backgroundColour'],30)?>; }
#menu a.selected div.icon 				{ background-color: #<?=$centre['backgroundColour']?>; }

/***************************************\

			Footer Styling
				
\***************************************/

#footer {
	padding-bottom:40px;
	background: #EEE;
}
#footer-block {
	letter-spacing:-4px;
	vertical-align: top;
}

#footer-contact, #footer-links 	{ width:340px; } /* 160 + 20 + 160 */
#footer-powered 				{ width:160px; } /* 160 */

#footer-powered, #footer-contact, #footer-links {
	display: inline-block; *display: inline; zoom: 1;
	vertical-align: top;
	letter-spacing: 0px;
	position: relative;
	top:5px;
}
#footer-links, #footer-powered 	{ margin-left: 20px; }

#footer a 		{ color: inherit; }
#footer a:hover { opacity: 0.8; cursor:pointer; }
#footer h1 {
	font-size: 20px;
	margin-bottom: 20px;
	position: relative;
	top: 8px;
}
#footer p {
	margin: 0px;
}
#footer-powered .product-logo, #footer-powered .company-logo {
	width:100px;
	height:40px;
	background-image:url('/img/icons/icons.png');
	margin-bottom: 10px;
}
#footer-powered div:hover{ opacity: 0.8; }



































/*
	Jquery Action headings and crap
*/
#content .ui-widget{
	font-size: inherit;
	font-family: inherit;
}
#content .ui-widget-content {
	padding: 20px;
	background: #EEE;
}
#content .ui-corner-all, #content .ui-corner-top, #content .ui-corner-right, #content .ui-corner-tr{
	border-radius: 0px;
}
#content .ui-state-active, #content .ui-widget-content .ui-state-active, #content .ui-widget-header .ui-state-active{
	border: none;
}
#content .ui-state-default, #content .ui-widget-content .ui-state-default, #content .ui-widget-header .ui-state-default{
	border: none;	
}
#content h3.sectionHeading{
	padding: 40px;
	padding-top:10px;
	padding-bottom:10px;
	margin-bottom: 0px;
	margin-top: 0px;
	color: #EEE;
	line-height: 40px;
	background: #333333;
	position: relative;
	top: 0px;
}

#content h3.sectionHeading:hover{
	opacity: 0.8;
}

#content div.sectionBody{
	border-radius: 0px;
	border: none;
}












.fancybox-overlay textarea {
	width: 217px;
	height: 50px
}









/***************************************\

            Widget Div

    	SIS specific content.
                
\***************************************/

div.widget.welcome-message 	div.widget-title { background: #<?=$centre['backgroundColour']?>; }
div.widget.subscribe 		div.widget-title { background: #D93600; }





/***************************************\

				Icons
				
\***************************************/

#menu .homepage 			div.icon 	{ background-position: -120px -260px; }
#menu .calendar 			div.icon 	{ background-position: -120px -280px; }
#menu .tournaments 			div.icon 	{ background-position: -120px -300px; }
#menu .matches 				div.icon 	{ background-position: -120px -320px; }
#menu .tickets 				div.icon 	{ background-position: -120px -340px; }
#menu .help 				div.icon 	{ background-position: -120px -360px; }
#menu .account 				div.icon 	{ background-position: -120px -380px; }
#menu .login 				div.icon 	{ background-position: -120px -420px; }
#menu .logout 				div.icon 	{ background-position: -120px -440px; }
#menu .register 			div.icon 	{ background-position: -120px -460px; }

#footer-powered .product-logo			{ background-position: -380px  -60px; }
#footer-powered .company-logo			{ background-position: -380px  -20px; }









/*SIGNUP PAGE */

/*
#sectionHeading-submit {
	background: #e6e6e6 url('/img/vendor/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png') 50% 50% repeat-x;
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	border: 1px solid #d3d3d3;
	color: #444;
	cursor: pointer;
	display: block;
	font-size: 14px;
	font-weight: bold;
	margin-top: 2px;
	padding: .5em .5em .5em .7em;
	padding-left: 2.2em;
}